package com.pet.api.client;

import com.pet.api.dto.AddressDTO;
import com.pet.api.dto.UserReviewInfoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Collection;
import java.util.Map;

@FeignClient("user-service")
public interface UserClient {
    @GetMapping("/memberships/discount")
    Integer queryDiscountByUser();

    @GetMapping("/addresses/order/{id}")
    AddressDTO queryAddressById(@PathVariable Integer id);

    @PutMapping("/users/points/pay")
    void addPointsByPay(@RequestParam("totalFee") Integer totalFee);

    @PostMapping("/users/getIdNickname")
    Map<Integer, String> getIdNicknameMap(@RequestBody Collection<Integer> userIds);

    @PostMapping("/users/getUserReviewInfo")
    Map<Integer, UserReviewInfoDTO> queryUserReviewInfo(@RequestBody Collection<Integer> userIds);
}